<?php

// phpMyRealty 3
//
// File Name: common_header.php
// File Location : ./includes/
//
// Copyright (c)2009 phpMyRealty.com
//
// e-mail: support@phpMyRealty.com

// Gzip (compress) the page output if allowed by admin and
// server and browser support it
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
 $SERVER_ENCODING = $_SERVER['HTTP_ACCEPT_ENCODING'];
else
 $SERVER_ENCODING = '';

if ( $conf['gzip'] == 'ON' && ereg ( 'gzip', $SERVER_ENCODING ) && extension_loaded ( 'zlib' ) ) {
 // A possible ob_start() warning may appear on the screen
 // due to some virtual hosting configurations, we suppress it.
 @  ob_start("ob_gzhandler");
 @  ob_implicit_flush(0);
 @  header("Content-Encoding: gzip");
}

// Do not cache the dynamic output
header("Expires: Mon, 1 Jan 1980 01:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
header("Content-Type: text/html; charset=utf-8");

// The time we started creating the page
$timing_start = explode(' ', microtime());

?>